package com.dzl.enterprise.service;

import com.dzl.enterprise.pojo.dto.WelfareEnterpriseApiOrderSaveDto;
import com.dzl.enterprise.pojo.query.WelfareEnterpriseApiGoodsQuery;
import com.dzl.enterprise.pojo.vo.WelfareEnterpriseApiGoodsBaseVo;
import com.dzl.enterprise.pojo.vo.WelfareEnterpriseApiOrderExpressVo;
import com.dzl.enterprise.pojo.vo.WelfareEnterpriseApiOrderVo;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * api接口，包括商品的，订单的等接口，供第三方调用
 * @author liuguanjun
 * @date 2021-11-24 14:14:23
 */
public interface WelfareEnterpriseApiService {


    /**
     * api接口获取token
     * @param apiId 商户id
     * @param apiSecret 密钥
     * @author liuguanjun
     * @date 2021-11-24 15:29:30
     **/
    String getWelfareEnterpriseApiToken(String apiId, String apiSecret);

    /**
     * 查询供应商商品数据列表，第三方接口调用
     * @author liuguanjun
     * @date 2021-11-24 14:00:30
     * @param query 查询条件
     **/
    PageInfo<WelfareEnterpriseApiGoodsBaseVo> getWelfareEnterpriseApiGoodsListPage(WelfareEnterpriseApiGoodsQuery query);

    /**
     * 保存api订单
     * @param welfareEnterpriseApiOrderSaveDto 订单保存对象
     * @author liuguanjun
     * @date 2021-11-24 14:18:30
     **/
    Integer saveWelfareEnterpriseApiOrder(WelfareEnterpriseApiOrderSaveDto welfareEnterpriseApiOrderSaveDto);

    /**
     * 获取api订单详情
     * @param orderId 订单id
     * @author liuguanjun
     * @date 2021-11-24 14:18:30
     **/
    WelfareEnterpriseApiOrderVo getWelfareEnterpriseApiOrderDetail(Integer orderId);

    /**
     * 订单确认收货
     * @param orderId 订单id
     * @param enterpriseId 企业id
     * @author liuguanjun
     * @date 2021-11-26 10:18:30
     **/
    Integer confirmReceiptOrder(Integer orderId, Integer enterpriseId);

    /**
     * 订单物流查询
     * @date 2021/12/09 14:06
     * @author liuguanjun
     * @param orderId  订单id
     */
    List<WelfareEnterpriseApiOrderExpressVo> getOrderExpressInfo(Integer orderId);
}
